<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta charset='UTF-8' />
    <title>Output of rails_best_practices</title>
    <style type="text/css">
      body {
        color: #333;
        background: #eee;
        padding: 0 20px;
      }
      h1 {
        color: ##4E4E4E;
      }
      p {
        margin: 5px 0;
      }
      table {
        background: white;
        border: 1px solid #666;
        border-collapse: collapse;
        margin: 10px 0;
        font-size: 14px;
      }
      table.result th, table.result td {
        padding: 4px;
        border: 1px solid #D0D0D0;
      }
      table.result th {
        background-color: #DFC;
        color: #337022;
      }
      table.result td.filename {
        color: #ED1556;
      }
      table.result tr:hover {
        background-color: #FFFFC0;
      }
      ul {
        clear: both;
        display: inline-block;
        padding: 0;
        margin: 0;
      }
      ul li {
       list-style: none;
       display: none;
       float: left;
      }
    </style>
  </head>
  <body>
    <h1>rails_best_practices output</h1>
    <p>
      Please go to
      <a href='http://rails-bestpractices.com' target='_blank'>http://rails-bestpractices.com</a>
      to see more useful Rails Best Practices.
    </p>
    <p>
        Found 51 warnings.
    </p>
    <table>
          <tr>
              <td>
                <input type="checkbox" class="error-type" id="AlwaysAddDbIndexReview" value="AlwaysAddDbIndexReview"
                />&nbsp;<label for="AlwaysAddDbIndexReview">Always Add Db Index</label>
              </td>
              <td>
                <input type="checkbox" class="error-type" id="ReplaceInstanceVariableWithLocalVariableReview" value="ReplaceInstanceVariableWithLocalVariableReview"
                />&nbsp;<label for="ReplaceInstanceVariableWithLocalVariableReview">Replace Instance Variable With Local Variable</label>
              </td>
          </tr>
          <tr>
              <td>
                <input type="checkbox" class="error-type" id="MoveCodeIntoModelReview" value="MoveCodeIntoModelReview"
                />&nbsp;<label for="MoveCodeIntoModelReview">Move Code Into Model</label>
              </td>
              <td>
                <input type="checkbox" class="error-type" id="RestrictAutoGeneratedRoutesReview" value="RestrictAutoGeneratedRoutesReview"
                />&nbsp;<label for="RestrictAutoGeneratedRoutesReview">Restrict Auto Generated Routes</label>
              </td>
          </tr>
        <tr>
          <td colspan="3">
            <button id="show-all">Check all</button>
            <button id="show-none">Uncheck all</button>
          </td>
        </tr>
    </table>
    <table class="result">
      <thead>
        <tr>
          <th>Filename</th>
          <th>Line Number</th>
          <th>Warning Message</th>
        </tr>
      </thead>
      <tbody>
          <tr class="AlwaysAddDbIndexReview">
            <td class='filename'>
                db/schema.rb
            </td>
            <td class='line'>27</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/21-always-add-db-index' target='_blank'>always add db index (addresses => [addressable_id, addressable_type])</a>
            </td>
          </tr>
          <tr class="AlwaysAddDbIndexReview">
            <td class='filename'>
                db/schema.rb
            </td>
            <td class='line'>119</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/21-always-add-db-index' target='_blank'>always add db index (descriptions => [descripable_id, descripable_type])</a>
            </td>
          </tr>
          <tr class="MoveCodeIntoModelReview">
            <td class='filename'>
                app/views/layouts/_header.html.erb
            </td>
            <td class='line'>stmts_add</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/25-move-code-into-model' target='_blank'>move code into model (request use_count > 2)</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>3</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>7</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>8</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>14</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>15</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>21</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>22</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>28</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>29</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>35</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>36</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>42</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>43</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>49</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/events/_form.html.erb
            </td>
            <td class='line'>50</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/leads/_form.html.erb
            </td>
            <td class='line'>1</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>3</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>7</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>8</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>14</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>15</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>21</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>22</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>28</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>29</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>35</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>36</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>42</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>43</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>49</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/phone_calls/_form.html.erb
            </td>
            <td class='line'>50</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>3</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>7</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>8</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>14</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>15</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>21</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>22</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>28</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>29</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>35</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>36</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>42</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>43</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>49</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="ReplaceInstanceVariableWithLocalVariableReview">
            <td class='filename'>
                app/views/tasks/_form.html.erb
            </td>
            <td class='line'>50</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable' target='_blank'>replace instance variable with local variable</a>
            </td>
          </tr>
          <tr class="RestrictAutoGeneratedRoutesReview">
            <td class='filename'>
                config/routes.rb
            </td>
            <td class='line'>4</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/86-restrict-auto-generated-routes' target='_blank'>restrict auto-generated routes companies (only: [:new, :create])</a>
            </td>
          </tr>
          <tr class="RestrictAutoGeneratedRoutesReview">
            <td class='filename'>
                config/routes.rb
            </td>
            <td class='line'>14</td>
            <td class='message'>
              <a href='http://rails-bestpractices.com/posts/86-restrict-auto-generated-routes' target='_blank'>restrict auto-generated routes calendars (only: [])</a>
            </td>
          </tr>
      </tbody>
    </table>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript">
      $(function() {
        $('ul li').show();
        $('input.error-type[type=checkbox]').prop('checked', true).click(function() {
          if ($(this).attr('checked')) {
            $(this).prop('checked', true);
            $('.'+$(this).val()).show();
          } else {
            $(this).prop('checked', false);
            $('.'+$(this).val()).hide();
          }
        });
        $('#show-all').click(function() {
          $('input.error-type[type=checkbox]').prop('checked', true);
          $('table.result tbody tr').show();
        });
        $('#show-none').click(function() {
          $('input.error-type[type=checkbox]').prop('checked', false);
          $('table.result tbody tr').hide();
        });
      });
    </script>
  </body>
</html>
